package com.zdlyh.timejob;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class TestJob {
    // Scheduled标识需要定时执行的代码
    @Scheduled(cron = "0 0/10 * * * ?")
    public void test(){
        // 要执行的代码
        System.out.println("定时任务执行了");
    }
}
